<%@ taglib prefix="s" uri="/struts-tags" %>
<%--
  Created by IntelliJ IDEA.
  User: 高金磊
  Date: 2021/3/31
  Time: 10:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <link rel="icon" href="<%=basePath%>favicon.ico" type="image/ico">
    <link href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet">
    <link href="<%=basePath%>css/fonts.css" rel="stylesheet">
    <!--标签插件-->
    <link rel="stylesheet" href="<%=basePath%>js/jquery-tags-input/jquery.tagsinput.min.css">
    <link href="<%=basePath%>css/style.css" rel="stylesheet">
</head>

<body style="margin: 10px">
<%--<form action="AddUser.action">--%>
    <%--&lt;%&ndash;<% boolean flag=request.getSession().getAttribute("code")==null;%>&ndash;%&gt;--%>
    <%--<% boolean flag=true;%>--%>
    <%--<span>用户名:</span>--%>
    <%--<span><input name="username" type="text" value="<%=(request.getParameter("username")==null&&flag)?"":request.getParameter("username")%>" ></span><br>--%>
    <%--<span>密码:</span>--%>
    <%--<span><input name="password" type="text" minlength="6" value="<%=(request.getParameter("password")==null&&flag)?"":request.getParameter("password")%>" ></span><br>--%>
    <%--<span>确认密码:</span>--%>
    <%--<span><input name="check_password" type="text" minlength="6" value="<%=(request.getParameter("check_password")==null&&flag)?"":request.getParameter("check_password")%>" ></span><br>--%>
    <%--<span>姓名:</span>--%>
    <%--<span><input name="name" type="text" value="<%=(request.getParameter("name")==null&&flag)?"":request.getParameter("name")%>" ></span><br>--%>
    <%--<span>电话:</span>--%>
    <%--<span><input name="phone" type="tel" size="11" value="<%=(request.getParameter("phone")==null&&flag)?"":request.getParameter("phone")%>" ></span><br>--%>
    <%--<span>年龄:</span>--%>
    <%--<span><input name="age" type="number" value="<%=(request.getParameter("age")==null&&flag)?"":request.getParameter("age")%>" ></span><br>--%>
    <%--<br>--%>
    <%--<span style="color: red;font-size: 13px"><%=request.getSession().getAttribute("err")==null?"":request.getSession().getAttribute("err")%></span>--%>
    <%--<br>--%>
    <%--<span><input type="submit" value="提交"></span>--%>
    <%--<span style="color: green;font-size: 13px"><%=request.getSession().getAttribute("message")==null?"":request.getSession().getAttribute("message")%></span>--%>
    <%--&lt;%&ndash;<span style="color: red;font-size: 13px"><s:actionerror/></span>&ndash;%&gt;--%>
<%--</form>--%>

<!--页面主要内容-->
<main class="ftdms-layout-content">

    <div class="container-fluid" style="margin-bottom:90px;">

        <span style="color: green;font-size: 13px"><%=request.getSession().getAttribute("message")==null?"":request.getSession().getAttribute("message")%></span>
        <span style="color: red;font-size: 13px"><%=request.getSession().getAttribute("err")==null?"":request.getSession().getAttribute("err")%></span>
        <div class="row" style="margin-top:15px;">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-body">

                        <form action="AddUser.action" method="get" class="row">
                            <% boolean flag=true;%>
                            <div class="form-group col-md-12">
                                <label for="title">用户名</label>
                                <input type="text" class="form-control" id="title" name="username"  value="<%=(request.getParameter("username")==null&&flag)?"":request.getParameter("username")%>" placeholder="用户名" />
                            </div>
                            <div class="form-group col-md-12">
                                <label for="seo_keywords">密码</label>
                                <input type="text" class="form-control" id="seo_keywords" name="password"  minlength="6" value="<%=(request.getParameter("password")==null&&flag)?"":request.getParameter("password")%>" placeholder="密码" />
                            </div>
                            <div class="form-group col-md-12">
                                <label for="seo_keywords">确认密码</label>
                                <input type="text" class="form-control"  name="check_password"  minlength="6" value="<%=(request.getParameter("check_password")==null&&flag)?"":request.getParameter("check_password")%>" placeholder="确认密码" />
                            </div>
                            <div class="form-group col-md-12">
                                <label for="seo_description">用户姓名</label>
                                <input class="form-control" id="seo_description" name="name"  value="<%=(request.getParameter("name")==null&&flag)?"":request.getParameter("name")%>" placeholder="姓名" />
                            </div>

                            <div class="form-group col-md-12">
                                <label for="seo_keywords">电话</label>
                                <input type="tel" class="form-control" name="phone"  size="11" value="<%=(request.getParameter("phone")==null&&flag)?"":request.getParameter("phone")%>" placeholder="电话" />
                            </div>
                            <div class="form-group col-md-12">
                                <label for="seo_keywords">年龄</label>
                                <input  class="form-control" name="age" type="number" min="0" max="120" value="<%=(request.getParameter("age")==null&&flag)?"":request.getParameter("age")%>" placeholder="年龄" />
                            </div>
                            <div>
                                <br>

                                <br>
                                <div class="form-group col-md-12">
                                    <button type="submit" class="btn btn-primary ajax-post" target-form="add-form">确 定</button>
                                </div>
                            </div>
                        </form>

                    </div>
                </div>
            </div>

        </div>

    </div>

</main>
<!--End 页面主要内容-->

<script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/bootstrap.js"></script>
<script type="text/javascript" src="<%=basePath%>js/perfect-scrollbar.min.js"></script>
<!--标签插件-->
<script src="<%=basePath%>js/jquery-tags-input/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/main.min.js"></script>
</body>
</html>
